#include<unistd.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(void)
{
	FILE* read_fp;
	char buffer[BUFSIZ + 1];
	int chars_read;
	
	memset(buffer, 0, sizeof(buffer));
	read_fp = popen("cat *popen*.c | wc -l", "r");
	if (NULL != read_fp)
	{
		do
		{
			chars_read = fread(buffer, sizeof(char), BUFSIZ, read_fp);
			buffer[chars_read - 1] = '\0';
			printf("Reading:-\n %s\n", buffer);
		}while (chars_read > 0);
	}
	pclose(read_fp);
	
	return 0;
}